package com.qzn.backend.dto;

import java.util.HashMap;
import java.util.Map;

import org.springframework.util.StringUtils;

public class GetReportDto {

	private String user = "";
	private Map<String, String> statusList = new HashMap<String, String>();
	private String status = "";
	private int pageno = 0;
	private int size = 20;
	private int offset;
	private int cnt;

	public void setOffset() {
		int no = this.pageno;
		int sz = this.size;
		this.offset = no * sz;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public void setPageno(int pageno) {
		if (StringUtils.isEmpty(pageno)) {
			this.pageno = 0;
		} else {
			this.pageno = pageno;
		}
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		if (StringUtils.isEmpty(size)) {
			this.size = 10;
		} else {
			this.size = size;
		}
	}

	public int getOffset() {
		return offset;
	}

	public void setOffset(int offset) {
		this.offset = offset;
	}

	public int getPageno() {
		return pageno;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Map<String, String> getStatusList() {
		return statusList;
	}

	public void setStatusList(Map<String, String> statusList) {
		this.statusList = statusList;
	}

	public int getCnt() {
		return cnt;
	}

	public void setCnt(int cnt) {
		this.cnt = cnt;
	}
}
